[root@web-server part1]# cat  system.sh
#!/bin/bash

echo -e "\033[32m ######### 获取系统信息###########\033[0m"

echo "主机名:"
hostname

echo  "操作系统类型"

hostnamectl  | grep  "Operating System"


echo -e "\033[32m ######### 获取内存信息###########\033[0m"

echo  "输出内存"
free  -h  
echo -e "\033[32m ######### 获取disk info 信息###########\033[0m"
df -h 
echo -e "\033[32m ######### 获取ip address ###########\033[0m"
ip ad | grep  inet
